<template>
  <a-menu
    class="siderMenu"
    theme="dark"
    mode="inline"
    :default-selected-keys="['1']"
    @click="handleClick"
  >
    <a-menu-item key="1" class="menu">
      <a-icon type="bar-chart" />
      <span class="menu">数据统计</span>
    </a-menu-item>
    <a-menu-item key="2" class="menu">
      <a-icon type="team" />
      <span>用户管理</span>
    </a-menu-item>
  </a-menu>
</template>

<script>
export default {
  methods: {
    handleClick(e) {
      if (e.key == 1) {
        this.$emit("func", "statistics");
      } else if (e.key == 2) {
        this.$emit("func", "management");
      }
    }
  }
};
</script>

<style scoped>
.menu{
  font-size: 20px;
}
.siderMenu {
  background-color: rgb(0, 80, 128, 1);
}
</style>